from django.contrib.auth.models import AbstractUser, Permission, User


class User(AbstractUser):

    def get_user_groups(self):
        return [{"id": group.id, "name": group.name} for group in self.groups.all()]


# class AuthPermission(Permission):
#
#     @classmethod
#     def get_absolute_url(cls):
#         return '/api/v1.0/account/permissions/'
#
#     class Meta:
#         proxy = True
